.TH E1432_SET_USER_DATA 3 E1432
.SH NAME
.nf
e1432_set_user_data \- Set user data parameters.
.fi
.IX e1432_set_user_data(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_user_data(E1432ID hw, SHORTSIZ16 ID,
                               LONGSIZ32 frame_length,
                               SHORTSIZ16 word_length,
                               SHORTSIZ16 sub_length,
                               SHORTSIZ16 sub_pos)
.cE
.SH DESCRIPTION

\fIe1432_set_user_data\fR sets up the necessary parameters for handling
user data from SCAs.
\fIe1432_set_user_data\fR is applicable only when
\fIe1432_sca_dsp_download\fR has been used to download alternative DSP programs
to the SCAs which interleave user data bits/words with time data bits/words.

After a successful call to \fIe1432_set_user_data\fR, 
\fBE1432_DATA_USER1\fR becomes a valid parameter for \fIe1432_set_calc_data\fR,
\fBE1432_ENABLE_TYPE_USER1\fR becomes a valid parameter for
\fIe1432_set_enable\fR, and
\fBE1432_USER1_DATA\fR becomes a valid parameter for \fIe1432_read_raw_data\fR.

These parameter are "global" parameters.
They apply to an entire E1432 module rather than to one of its channels.
The \fIID\fR parameter is used only
to identify which module the function applies to.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIframe_length\fR specifies how many user data points constitute a "frame".
Data returned by \fIe1432_read_raw_data\fR is frame aligned.
\fIframe_length\fR also becomes the block length for \fBE1432_USER1_DATA\fR.
\fIframe_length\fR must be greater than or equal to 1.

\fIword_length\fR is the length, in bits of a user data point.
\fIword_length\fR must be less than or equal to 32, the length of the
words returned by \fIe1432_read_raw_data\fR.
A \fIword_length\fR of 0 turns off the user data mode.
Otherwise, \fIword_length\fR must be greater than or equal to 2.
\fIword_length\fR must be 32 for interleaved 16 bit time data, 16 bit user data.

\fIsub_length\fR is the number of bits in the lower bits of an SCA data word
that are user data bits.
\fIsub_length\fR must be greater than or equal to 2
and less than or equal to 16.
\fIsub_length\fR must be 16 for interleaved 16 bit time data, 16 bit user data.
\fIsub_length\fR should divide evenly into \fIword_length\fR with a quotient
greater than or equal to 1.

\fIsub_pos\fR is the position of the user bits in the SCA data word.
It should be 0 for interleaved 16 bit time data, 16 bit user data.
For \fIsub_length\fR less than 16, it should be 8, to account for the status
bits being placed in the lower 8 bits of the SCA data word.
.SH "RESET VALUE"
After a reset, the user data mode is not in effect
(\fIword_length\fR is 0).
.SH "RETURN VALUE"
Return 0 if successful, 
\fBERR1432_HARDWARE_INCAPABLE\fR when the parameters cannot be accommodated.
.SH "SEE ALSO"
.na
e1432_dsp_exec_query, e1432_sca_dsp_download
.ad
